package com.ihr360.payroll.type;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ihr360.commons.model.annotation.EnumData;
import com.ihr360.commons.serializer.jackson.EnumDataSerializer;

/** 薪资操作 */
@EnumData
@JsonSerialize(using = EnumDataSerializer.class)
public enum FieldTaxType {

    TAX_ADD("税前加项", "Pre-tax additions"),
    TAX_SUBTRACT("税前减项", "Pre-tax reduction"),
    AFTER_TAX_ADD("税后加项", "Post-tax additions"),
    AFTER_TAX_SUBTRACT("税后减项", "Post-tax additions");


    private String title;

    private String engTitle;

    @JsonCreator
    public static FieldTaxType factory(@JsonProperty(value = "id") String id) {
        return FieldTaxType.valueOf(id);
    }

    FieldTaxType(String title, String engTitle) {
        this.title = title;
        this.engTitle = engTitle;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getEngTitle() {
        return engTitle;
    }

    public void setEngTitle(String engTitle) {
        this.engTitle = engTitle;
    }
}
